Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Maintain active dataset fields #1878

Merged
merged 3 commits into from
Jun 20, 2022
Merged

Maintain active dataset fields #1878

merged 3 commits into from
Jun 20, 2022

Conversation

benjaminpkane
Copy link
Contributor

Resolves #1852

@benjaminpkane benjaminpkane added bug Bug fixes app Issues related to App features labels Jun 13, 2022
@benjaminpkane benjaminpkane self-assigned this Jun 13, 2022
const newDataset = transformDataset(dataset);

const oldDataset = get(atoms.dataset);
oldDataset && console.log(oldDataset.id, newDataset.id);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Stray console.log?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, thanks

const oldDataset = get(atoms.dataset);
oldDataset && console.log(oldDataset.id, newDataset.id);
if (!oldDataset || oldDataset.id !== newDataset.id) {
reset(_activeFields({ modal: false }));
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is there a reason this isn't in useStateUpdate()? Looks like there are similar things there.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good point, fixed

Copy link
Contributor

@ritch ritch left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

FIx LGTM. Left a few comments, but shouldn't hold up the fix.

@benjaminpkane benjaminpkane merged commit 9406199 into develop Jun 20, 2022
@benjaminpkane benjaminpkane deleted the bugfix/iss-1852 branch June 20, 2022 14:05
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
app Issues related to App features bug Bug fixes
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[BUG] Changing session.view resets field visibility choices
2 participants